package day2.homework;

import java.util.Arrays;

public
class Demo1 {
    public static
    void main(String[] args) {
        for(int i=2;i<=100;i++){
            boolean flag=true;
            for(int j=2;j<i;j++){
                if(i%j==0){
                    flag=false;
                    break;
                }
            }
            if(flag){
                System.out.println(i);
            }
        }
        int[] a={12,17,14,13,18,10};
        for (int i=0;i<a.length-1;i++){
            int x=i;
            for (int j=i+1;j<a.length;j++){
               if (a[j]<a[x]){
                   x=j;
               }
            }
            if (x!=i){
                int temp = a[i];
                a[i] = a[x];
                a[x] = temp;
            }
            System.out.println(Arrays.toString(a));
        }

    }
}
